package br.fatec.util;

import br.fatec.webservice.client.ThreadFlamelWs;



public class Globals {
	private static Globals instance;
	private Persistencia persistencia;
	private Persistencia threadPersistencia;
	private ThreadFlamelWs thread;
	
	private Globals()
	{
		
	}
	
	public static synchronized Globals getInstance()
	{
		if(instance == null)
		{
			instance = new Globals();
			instance.persistencia = new Persistencia();
			instance.threadPersistencia = new Persistencia();
			instance.thread = new ThreadFlamelWs(); 
		}
		
		return instance;
	}

	public Persistencia getPersistencia() {
		return persistencia;
	}

	public void setPersistencia(Persistencia persistencia) {
		this.persistencia = persistencia;
	}

	public ThreadFlamelWs getThread() {
		return thread;
	}

	public void setThread(ThreadFlamelWs thread) {
		this.thread = thread;
	}

	public Persistencia getThreadPersistencia() {
		return threadPersistencia;
	}

	public void setThreadPersistencia(Persistencia threadPersistencia) {
		this.threadPersistencia = threadPersistencia;
	}	
}
